package cn.kongwg.jvmse.bianma;

import com.sun.org.apache.bcel.internal.classfile.Code;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;

/**
 * @author kongwg
 * @create 2021-05-15 19:06
 */
public class Demo1 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String encode = URLEncoder.encode("http://127.0.0.1", "utf-8");
        System.out.println("encode = " + encode);

        String decode = URLDecoder.decode(encode, "utf-8");
        System.out.println("decode = " + decode);
    }
}
